package com.cskaoyan.bean.validation;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * @author stone
 * @date 2022/07/18 09:45
 */
@Data
public class ValidationUser {
    @Length(min = 6) //该字符串的长度至少为6位
    String username;
    @Length(min = 6, max = 8)
    String password;
    @Min(18)
    @Max(70)
    Integer age;
}
